Mod Name / Version: Search fix <br /> <br />
Description: This allows search 'By Display Name' to function (it was busted and returned no results). <br /> <br />
Working Under: UBB.Threads 6.3 <br /> <br />
Mod Status: Beta <br /> <br />
Any pre-requisites: <br /> <br />
Author(s): Twisty <br /> <br />
Date: 07/25/04 <br /> <br />
Credits: <br /> <br />
Files Altered: <br /> <br />dosearch.php <br />templates/search.tmpl (optional) <br /> <br />
New Files: <br /> <br />
Database Altered: no <br /> <br />
Info/Instructions: In dosearch.php... <br /> <br />CHANGE THIS: <br /> <br />
// ------------------------------------------------------------------------- <br />// If we are searching for all posts by a user we need to know their username <br /> if ($Match == "Username") { <br /> $where = "U_Number = '$Words'"; <br /> <br />TO THIS: <br /> <br />
// ------------------------------------------------------------------------- <br />// If we are searching for all posts by a user we need to know their username <br /> if ($Match == "Username") { <br /> $where = "U_Username = '$Words'"; <br /> <br /> <br />OPTIONAL: <br /> <br />I also recommend removing the 'By username' entry box from search.php since it appears to be entirely redundant to the 'Words to search for' entry box, and mimics it's behaviour in an identical manner (not to mention causes extra confusion)... <br /> <br />In templates/search.tmpl... <br /> <br />CHANGE THIS: <br /> <br />
{$ubbt_lang['SEARCH_WORDS']}<br /> <br /><input type="text" name = "Words" size="30" class="formboxes" /> <br /><br /> <br /><br /> <br />By username<br> <br /><input type="text" name = "byuser" size="30" class="formboxes" /> <br /><br /> <br /><br /> <br /> <br />TO THIS: <br /> <br />
{$ubbt_lang['SEARCH_WORDS']}<br /> <br /><input type="text" name = "Words" size="30" class="formboxes" /> <br /><br /> <br /><br /> <br /> <br /> <br />:-) <br /> <br />
Disclaimer: Please backup every file that you intend to modify. <br />If the modification modifies the database, it's a good idea to backup your database before doing so. <br /> <br />Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.